<template>
  <div id="index_app">
    <el-carousel indicator-position="outside">
      <el-carousel-item v-for="item in banner_list" :key="item.id">
        <img :src="'http://127.0.0.1:3000'+item.img">
      </el-carousel-item>
    </el-carousel>
    轮播图共有{{ banner_number }}张  <!-- this.$store.getters.banner_number-->
  </div>
</template>

<script>
import {mapState,mapGetters,mapActions,mapMutations} from "vuex"

export default {
    computed: {
        ...mapState(["banner_list"]),
        ...mapGetters(["banner_number"]),
        
    },
    methods: {
        ...mapActions(["bannerActions"]),
        ...mapMutations(["bannerMutations"]),
    },
    created(){
        this.bannerActions()
    }
};
</script>

<style scoped>


img{
    width: 100%;
    height: 228px;
}
</style>